﻿namespace GX
{
    public abstract class Behaviour
    {
        Entity _entity;
        public Entity entity { get { return _entity; } }
        internal void SetEntity(Entity entity)
        {
            _entity = entity;
        }
        public abstract int id { get; }
        public virtual int order { get { return 0; } }
        public virtual void OnAttach() { }
        public virtual void OnDetach(Entity entity, bool isDestroy) { }
        public virtual void ProcessEvent(int evt, object arg) { }
    }
}
